<template>
  <h1>El-下拉选框组件</h1>
  <el-select placeholder="请选择五一出游的城市"
             style="width:50%;" v-model="city">
    <el-option label="北京" value="bj"></el-option>
    <el-option label="上海" value="sh"></el-option>
    <el-option label="南京" value="nj"></el-option>
    <el-option label="济南" value="jn"></el-option>
  </el-select>

  <h4>您要去的是:{{city}}</h4>
</template>

<script setup>
import {ref} from "vue";

//定义变量用来保存下拉选框提交的值
const city = ref('sh');
</script>

<style scoped>

</style>